package models

// 教学点表
type SysTeachingPoint struct {
	Id           int    `gorm:"primaryKey;autoIncrement;comment:编码"  json:"id"`
	Name         string `gorm:"type:varchar(64);comment:名字" json:"name"`
	ProvinceId   int    `gorm:"type:int(10);column:province_id;comment:省id" json:"province_id"`
	CityId       int    `gorm:"type:int(10);column:city_id;comment:市id" json:"city_id"`
	CountyId     int    `gorm:"type:int(10);column:county_id;comment:县id" json:"county_id"`
	DepartmentId int    `gorm:"type:int(10);column:department_id;comment:所属部门id" json:"department_id"`
	ControllerId int    `gorm:"type:int(10);column:controller_id;comment:负责人userid" json:"controller_id"`
	Address      string `gorm:"type:varchar(64);column:address;comment:地址" json:"address"`
	ModelTime
}

func (tp SysTeachingPoint) TableName() string {
	return "sys_teaching_point"
}

// 教学点和招生负责人对应表
type SysTeachingPoint2Enrollment struct {
	Id           int `gorm:"primaryKey;autoIncrement;comment:编码"  json:"id"`
	PointId      int `gorm:"index;type:int(10);comment:教学点id" json:"point_id"`
	EnrollmentId int `gorm:"index;type:int(10);comment:负责人用户id" json:"enrollment_id"`
}

func (te SysTeachingPoint2Enrollment) TableName() string {
	return "sys_teaching_point_enrollment"
}

// 教学点和招生老师对应表
type SysTeachingPoint2teacher struct {
	Id           int `gorm:"primaryKey;autoIncrement;comment:编码"  json:"id"`
	PointId      int `gorm:"index;type:int(10);comment:教学点id" json:"point_id"`
	EnrollmentId int `gorm:"index;type:int(10);comment:招生老师id" json:"enrollment_id"`
}

func (te SysTeachingPoint2teacher) TableName() string {
	return "sys_teaching_point_teacher"
}
